<?php
/*
$deleteJS = <<<DEL
$('.container').on('click','.time a.delete',function() {
	var th=$(this),
		container=th.closest('div.comment'),
		id=container.attr('id').slice(1);
	if(confirm('Are you sure you want to delete comment #'+id+'?')) {
		$.ajax({
			url:th.attr('href'),
			type:'POST'
		}).done(function(){container.slideUp()});
	}
	return false;
});
DEL;
Yii::app()->getClientScript()->registerScript('delete', $deleteJS);
*/
?>
<div class="comment" id="c<?php echo $data->id; ?>">

	<div class="author">
		<?php echo CHtml::link(CHtml::encode($data->title), "/index.php?r=site/showpost&id=".$data->id); ?>
		Posted By <?php echo $data->userid; ?> | 
		At <?php echo date('F j, Y \a\t h:i a',$data->createdtime); ?> |
		<?php echo CHtml::link('Reply',array('site/reply','id'=>$data->id)); ?> 
		
	</div>

	<div class="content">
		<?php echo nl2br(CHtml::encode($data->content)); ?>
	</div>

</div><!-- comment -->
<hr>